﻿using System.Collections.Generic;
using ZyGames.DZPocker.Model;
using ZyGames.Framework.Game.Contract;
using ZyGames.Framework.Common.Serialization;

namespace ZyGames.DZPocker.Script.CsScript.Action
{
	/// <summary>
	/// 10050广播所有玩家开始时间倒计时
	/// </summary>
	public class Action10050 : BaseAction
	{
		private int tableId;
		private int time;
		public Action10050(HttpGet actionGetter)
			: base((short)ActionType.DZBroadcastTimeLeft, actionGetter)
		{
		}
		public override bool GetUrlElement()
		{
			if (httpGet.GetInt("TableId", ref tableId) &&
				httpGet.GetInt("Time", ref time))
			{
				return true;
			}
			return false;
		}

		public override bool TakeAction()
		{
			return true;
		}

		public override void BuildPacket()
		{
			this.PushIntoStack(this.tableId);
			this.PushIntoStack(this.time);
		}
	}
}
